#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void* my_memmove(void * des, void  const * src,size_t num) {
	void* ret = des;
	if (des < src) {
		while (num--) {
			*(char*)des = *(char* )src;
			des = (char*)des + 1;
			src = (char*)src + 1;
			}
	}
	else {
		while (num--) {
			*((char*)des + num) = *((char*)src + num);
		}
	}
	return ret;
}
int main() {
	char arr1 [] = "12345";
	char arr2[] = "54321";
	printf("%s", my_memmove(arr1, arr2,6));
	return 0;
}